
version 8.0 
log using pres_runoff_US.log, replace
 #delimit ;

*     ***************************************************************** *;
*     ***************************************************************** *;
*       File-Name:      pres_runoff_US.do                               *;
*       Date:           5/18/05                                         *;
*       Author:         MRG                                             *;
*       Purpose:        Do-file to replicate additional results for     *;
*                       AJPS version of presidential candidates paper   *;
*                       where dependent variable is the number of       *;
*                       presidential candidates. Here I do not exclude  *;
*                       countries that use electoral college such as    *;
*                       the US or countries that use STV.  The results  *;
*                       are qualitatively similar.                      *;
*       Input File:     presidential_new.dta                            *;
*       Output File:    pres_runoff_US.log                              *;
*       Data Output:    None                                            *;
*       Previous file:                                                  *;
*       Machine:        Home                                            *;
*     ****************************************************************  *;
*     ****************************************************************  *;

set mem 10m;
set matsize 150;

use c:\ajps\presidential_new.dta;

*     ****************************************************************  *;
*                           Summary Statistics                          *;
*     ****************************************************************  *;

sum;

*     ****************************************************************  *;
*                    Relabel and Define Variables                       *;
*     ****************************************************************  *;

label var country  "countryname";
label var newdem "first election as new democracy";
label var countrynumber "countrynumber";
label var year "year";
label var regime "regime as of 31 December of given year 0=democracy 1=dictatorship";
label var regime_leg "regime type at time of legislative election 0 = democracy 1=dictatorship";
label var legelec "legislative election";
label var preselec "presidential election";
label var eighties "election in 1980s closest to 1985";
label var old "elections in countries that did not transition to democracy in 1990s";
label var nineties "elections in 1990s closest to 1995";
label var proximity1 "proximity - continuous";
label var proximity2 "proximity - dichotomous";
label var enpp "parliamentary parties - uncorrected";
label var enpp1 "parliamentary parties - corrected";
label var enep "electoral parties - uncorrected";
label var enep1 "electoral parties - corrected";
label var enpres "effective number of presidential candidates";
label var seats "assembly size";
label var districts "number of electoral districts";
label var avemag "average district magnitude";
label var medmag "median district magnitude";
label var upperseats "number of uppertier seats";
label var uppertier "percentage of uppertier seats";
label var eneg "effective number of ethnic groups  fearon";


*     ****************************************************************  *;
*                   Create variables ready for regressions              *;
*     ****************************************************************  *;

gen eneg_runoff = eneg*pres_runoff;

*     ****************************************************************  *;
*       Note that I do not drop countries that use an electoral college *;
*       or STV to elect their president now.                            *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                               1980s                                   *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff  eneg_runoff if eighties==1, robust;

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;

*     ****************************************************************  *;
*           What is the effect of eneg as runoff changes in the 1980s?  *;
*           When runoff is 0, then the effect of eneg is 0.08 (0.16)    *;
*           When runoff is 1, then the effect of eneg is 0.65 (0.30)    *;
*           When runoff is 1, eneg is significant at the 95% level      *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                               1990s                                   *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if nineties==1, robust;

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.22 (0.11).            *;
*       Effect of eneg in runoff systems is 0.19 (0.09).                *;
*       Thus, eneg is significant at 95% level when runoff=1            *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*       Now move on to pooled analyses                                  *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                            Full Sample                                *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff, robust cluster(country);

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;

*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.12 (0.12).            *;
*       Effect of eneg in runoff systems is 0.34 (0.11).                *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                       Established Democracies                         *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if old==1, robust cluster(country);

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;


*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.12 (0.17).            *;
*       Effect of eneg in runoff systems is 0.60 (0.20).                *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                       Presidential Regimes                            *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if institution==3, robust cluster(country);

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;

*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.09 (0.07).            *;
*       Effect of eneg in runoff systems is 0.49 (0.19).                *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*                       Established Presidential Regimes                *;
*     ****************************************************************  *;

regress enpres eneg pres_runoff eneg_runoff if institution==3 & old==1, robust cluster(country);

matrix b=e(b);
matrix V=e(V);
scalar b1=b[1,1];
scalar b3=b[1,3];

scalar varb1=V[1,1];
scalar varb3=V[3,3];
scalar covb1b3=V[1,3];

scalar conb=b1+b3*1;
display conb;

scalar conse=sqrt(varb1+varb3*1^2+2*covb1b3*1);
display conse;

scalar t=conb/conse;
display t;

*     ****************************************************************  *;
*       Effect of eneg in plurality systems is -0.07 (0.12).            *;
*       Effect of eneg in runoff systems is 0.69 (0.21).                *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*     ****************************************************************  *;
*       As you can see, the results become even stronger when you       *;
*       include these other countries such as the US.                   *;
*     ****************************************************************  *;
*     ****************************************************************  *;

*     ****************************************************************  *;
*     ****************************************************************  *;
*                                   THE END                             *;
*     ****************************************************************  *;
*     ****************************************************************  *;

exit;
